// components/setmealShow/setmealShow.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    visible: false,
    currentSetmeal: null,
    currentSetmealName:null
  },

  /**
   * 组件的方法列表
   */
  methods: {
    showDialog(setmeal,name) {
      this.setData({
        visible: true,
        currentSetmeal: setmeal,
        currentSetmealName:name
      })
    },
    handleCancel() {
      this.setData({
        visible: false
      })
    },
    handleConfirm() {
      // console.log(this.data.currentSetmeal);
      // console.log(this.data.currentSetmealName);
      const {
        currentSetmealName
      }=this.data;
      this.triggerEvent("setmealConfirm",{
        currentSetmealName
      })
      this.setData({
        visible: false
      })
      
    }
  }
})